// =====================================================================
//  File:		Enums.cs
//  Summary:	Defines constants to be used with the SDK.
// =====================================================================
//
//  This file is part of the Microsoft CRM V4 SDK Code Samples.
//
//  Copyright (C) Microsoft Corporation.  All rights reserved.
//
//  This source code is intended only as a supplement to Microsoft
//  Development Tools and/or on-line documentation.  See these other
//  materials for detailed information regarding Microsoft code samples.
//
//  THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//  PARTICULAR PURPOSE.
//
// =====================================================================
namespace XrmLibrary.MsCrm4Adapter.Enums
{
    /// <summary>
	/// Source of assembly for plug-in assemblies (database, disk, or GAC)  
	/// These constants must be in sync with an enum in Shared\Server\Utils\PluginTypeFactory.cs.
	/// </summary>
	public static class AssemblySourceType
	{
		public const int Database = 0;
		public const int Disk = 1;
		public const int Gac = 2;
	}

	public static class MessageProcessingStage
	{
		public const int BeforeMainOperationOutsideTransaction = 10;
		public const int AfterMainOperationOutsideTransaction = 50;
	}

	public static class MessageProcessingMode
	{
		public const int Synchronous = 0;
		public const int Asynchronous = 1;
	}

	/// <summary>
	/// Invocation source of the message.
	/// </summary>
	public static class MessageInvocationSource
	{
		// Message is invoked directly from web service.
		public const int Parent = 0;

		// Message is invoked from platform.
		public const int Child = 1;
	}

	/// <summary>
	/// Deployment that the plug-in supports. 
	/// </summary>    
	public static class SupportedDeployment
	{
		public const int ServerOnly = 0;
		public const int OutlookClientOnly = 1;
		public const int Both = 2;
	}

	/// <summary>
	/// Indicates the availability of a message.
	/// </summary>
	public static class MessageAvailability
	{
		public const int Server = 0;
		public const int Client = 1;
		public const int All = 2;
	}

	public static class MessageName
	{
		public const string AddItem = "AddItem";
		public const string AddMember = "AddMember";
		public const string AddMembers = "AddMembers";
		public const string AddMembersByFetchXml = "AddMembersByFetchXml";
		public const string Assign = "Assign";
		public const string Book = "Book";
		public const string Clone = "Clone";
		public const string Close = "Close";
		public const string CompoundCreate = "CompoundCreate";
		public const string Create = "Create";
		public const string Delete = "Delete";
		public const string DeliverIncoming = "DeliverIncoming";
		public const string DeliverPromote = "DeliverPromote";
		public const string GrantAccess = "GrantAccess";
		public const string Handle = "Handle";
		public const string Lose = "Lose";
		public const string Win = "Win";
		public const string Merge = "Merge";
		public const string ModifyAccess = "ModifyAccess";
		public const string Route = "Route";
		public const string Reschedule = "Reschedule";
		public const string Retrieve = "Retrieve";
		public const string RetrieveExchangeRate = "RetrieveExchangeRate";
		public const string RetrieveMultiple = "RetrieveMultiple";
		public const string RetrievePrincipalAccess = "RetrievePrincipalAccess";
		public const string RetrieveSharedPrincipalsAndAccess = "RetrieveSharedPrincipalsAndAccess";
		public const string RevokeAccess = "RevokeAccess";
		public const string RemoveItem = "RemoveItem";
		public const string RemoveMember = "RemoveMember";
		public const string RemoveMembers = "RemoveMembers";
		public const string RemoveMembersByFetchXml = "RemoveMembersByFetchXml";
		public const string SetState = "SetState";
		public const string SetStateDynamicEntity = "SetStateDynamicEntity";
		public const string Send = "Send";
		public const string Update = "Update";
		public const string ExecuteWorkflow = "ExecuteWorkflow";
	}

	/// <summary>
	/// Type of asynchronous operation.
	/// </summary>
	public static class AsyncOperationType
	{
		// Note: DO NOT renumber this enumberation.  
		//  Data in newimport.xml uses these values.
		public const int Event = 1;
		public const int BulkEmail = 2;
		public const int Parse = 3;
		public const int Transform = 4;
		public const int Import = 5;
		public const int ActivityPropagation = 6;
		public const int PublishDuplicateRule = 7;
		public const int BulkDetectDuplicates = 8;
		public const int CollectSqmData = 9;
		public const int Workflow = 10;
		public const int QuickCampaign = 11;
		public const int PersistMatchCode = 12;
		public const int BulkDelete = 13;
		public const int DeletionService = 14;
		public const int IndexManagement = 15;
		public const int CollectOrgStats = 16;
		public const int ImportingFile = 17;
		public const int CalculateOrgStorageSize = 18;
		public const int CollectOrgDBStats = 19;
		public const int CollectOrgSizeStats = 20;
		public const int DatabaseTuning = 21;
		public const int CalculateOrgMaxStorageSize = 22;
		public const int BulkDeleteChild = 23;
		public const int UpdateStatisticIntervals = 24;
		public const int FullTextCatalogIndex = 25;
		public const int DatabaseLogBackup = 26;
		public const int UpdateContractStates = 27;
	}
	
	/// <summary>
	/// Operation status provides further information for each particular asynchronous operation state.
	/// </summary>
	public static class AsyncOperationStatus
	{
		// State that status is valid for:
		public const int WaitingForResources = 0;	// Ready
		public const int Waiting = 10;				// Suspended
		public const int InProgress = 20;			// Locked
		public const int Pausing = 21;				// Locked
		public const int Canceling = 22;			// Locked
		public const int Succeeded = 30;			// Completed
		public const int Failed = 31;				// Completed
		public const int Canceled = 32;				// Completed
	}

	public static class ParameterName
	{
		public const string Assignee = "Assignee";
		public const string BusinessEntity = "BusinessEntity";
		public const string BusinessEntityCollection = "BusinessEntityCollection";
		public const string CampaignId = "CampaignId";
		public const string CampaignActivityId = "CampaignActivityId";
		public const string ColumnSet = "columnset";
		public const string Context = "context";
		public const string ContractId = "ContractId";
		public const string Id = "id";
		public const string EmailId = "emailid";
		public const string EndpointId = "EndpointId";
		public const string ExchangeRate = "ExchangeRate";
		public const string SubordinateId = "subordinateid";
		public const string EntityId = "EntityId";
		public const string EntityMoniker = "entityMoniker";
		public const string FaxId = "FaxId";
		public const string ListId = "ListId";
		public const string Query = "Query";
		public const string ReturnDynamicEntities = "ReturnDynamicEntities";
		public const string RouteType = "RouteType";
		public const string State = "state";
		public const string Status = "status";
		public const string Target = "Target";
		public const string Settings = "Settings";
		public const string TeamId = "TeamId";
		public const string TemplateId = "TemplateId";
		public const string UpdateContent = "UpdateContent";
		public const string ValidationResult = "ValidationResult";
		public const string OptionalParameters = "OptionalParameters";
		public const string TriggerAttribute = "TriggerAttribute"; // Attribute which trigger workflow update message 
		

		public const string PreBusinessEntity = "PreBusinessEntity";
		public const string PreMasterBusinessEntity = "PreMasterBusinessEntity";
		public const string PreSubordinateBusinessEntity = "PreSubordinateBusinessEntity";
		public const string PostBusinessEntity = "PostBusinessEntity";
		public const string PostMasterBusinessEntity = "PostMasterBusinessEntity";
		public const string WorkflowId = "WorkflowId";
		public const string AsyncOperationId = "AsyncOperationId";

	}

	/// <summary>
	/// Activity party types.
	/// </summary>
	public static class ActivityPartyType
	{
		public const int Sender = 1;
		public const int ToRecipient = 2;
		public const int CCRecipient = 3;
		public const int BccRecipient = 4;
		public const int RequiredAttendee = 5;
		public const int OptionalAttendee = 6;
		public const int Organizer = 7;
		public const int Regarding = 8;
		public const int Owner = 9;
		public const int Resource = 10;
		public const int Customer = 11;
		public const int Partner = 12;
	}

	/// <summary>
	/// Advanced find startup modes.
	/// </summary>
	public static class AdvancedFindStartupMode
	{
		public const int Simple = 1;
		public const int Detailed = 2;
	}

	/// <summary>
	/// Bulk operations statuses.
	/// </summary>
	public static class BulkOperationStatus
	{
		public const int Pending = 1;
		public const int InProgress = 2;
		public const int Aborted = 3;
		public const int Completed = 4;
		public const int Canceled = 5;
	}

	/// <summary>
	/// Bulk operation types.
	/// </summary>
	public static class BulkOperationType
	{
		public const int CreateActivities = 2;
		public const int SendDirectMail = 3;
		public const int Propagate = 4;
		public const int Execute = 5;
		public const int MiniCampaign = 7;
	}

	/// <summary>
	/// Marketing campaign channel types.
	/// </summary>
	public static class CampaignActivityChannelType
	{
		public const int Phone = 1;
		public const int Appointment = 2;
		public const int Letter = 3;
		public const int LetterViaMailMerge = 4;
		public const int Fax = 5;
		public const int FaxViaMailMerge = 6;
		public const int Email = 7;
		public const int EmailViaMailMerge = 8;
	}

	/// <summary>
	/// Marketing campaign response channel types.
	/// </summary>
	public static class CampaignResponseChannelType
	{
		public const int Email = 1;
		public const int Phone = 2;
		public const int Fax = 3;
		public const int Letter = 4;
		public const int Appointment = 5;
	}

	/// <summary>
	/// Cascading operations.
	/// </summary>
	public static class CascadeOps
	{
		public const int CascadeNone = 0;
		public const int CascadeDeepAll = 2;
	}

	/// <summary>
	/// Constraint based group type codes.
	/// </summary>
	public static class ConstraintBasedGroupTypeCode
	{
		public const int Static = 0;
		public const int Dynamic = 1;
		public const int Implicit = 2;
	}

	/// <summary>
	/// Contract allotment type codes.
	/// </summary>
	public static class ContractAllotmentTypeCode
	{
		public const int Case = 1;
		public const int Time = 2;
		public const int CoverageDates = 3;
	}

	/// <summary>
	/// Customer address types.
	/// </summary>
	public static class CustomerAddressType
	{
		public const int Account = 1;
		public const int Contact = 2;
	}

	/// <summary>
	/// Deletion state codes.
	/// </summary>
	public static class DeletionStateCode
	{
		public const int Active = 0;
		public const int SoftDelete = 1;
		public const int HardDelete = 2;
	}

	/// <summary>
	/// Email acceptance decision codes.
	/// </summary>
	public static class EmailDecisionReason
	{
		public const int Unknown = -1;
		public const int Duplicate = 0;
		public const int NoToken = 1;
		public const int NoTokenMatch = 2;
		public const int TokenMatch = 3;
		public const int NoRecipientMatch = 4;
		public const int InternalEmailReject = 5;
	}

	/// <summary>
	/// Event directions.
	/// </summary>
	public static class EventDirection
	{
		public const int Incoming = 0;
		public const int Outgoing = 1;
		public const int Internal = 2;
	}

	/// <summary>
	/// Extent codes.
	/// </summary>
	public static class ExtentCode
	{
		public const int Transparent = 0;
		public const int SubtractRecurrenceIntervals = 1;
		public const int SubtractResults = 2;
	}

	/// <summary>
	/// Inheritance masks.
	/// </summary>
	public static class InheritanceMask
	{
		public const int InheritNone = 0;
		public const int InheritProcessTemplate = 1;
		public const int InheritEmailTemplate = 2;
		public const int InheritReferralSource = 4;
		public const int InheritCompetitor = 8;
		public const int InheritSalesProcess = 16;
		public const int MustInheritProcessTemplate = 32;
		public const int MustInheritEmailTemplate = 64;
		public const int MustInheritReferralSource = 128;
		public const int MustInheritCompetitor = 256;
		public const int MustInheritSalesProcess = 512;
		public const int InheritAll = 1023;
	}

	/// <summary>
	/// Marketing campaign list types.
	/// </summary>
	public static class ListType
	{
		public const int Account = 1;
		public const int Contact = 2;
		public const int Lead = 4;
	}

	/// <summary>
	/// Lookup source type for LookupMapping
	/// </summary>
	public static class LookupSourceType
	{
		public const int Source = 0;
		public const int System = 1;
	}

	/// <summary>
	/// Price methods.
	/// </summary>
	public static class PriceMethod
	{
		public const int CurrencyAmount = 1;
		public const int PercentListPrice = 2;
		public const int MarkupCurrentCost = 3;
		public const int MarginCurrentCost = 4;
		public const int MarkupStandardCost = 5;
		public const int MarginStandardCost = 6;
	}

	/// <summary>
	/// Pricing error codes.
	/// </summary>
	public static class PricingErrorCode
	{
		public const int None = 0;
		public const int DetailError = 1;
		public const int MissingPriceLevel = 2;
		public const int InactivePriceLevel = 3;
		public const int MissingQuantity = 4;
		public const int MissingUnitPrice = 5;
		public const int MissingProduct = 6;
		public const int InvalidProduct = 7;
		public const int MissingPricingCode = 8;
		public const int InvalidPricingCode = 9;
		public const int MissingUnitOfMeasure = 10;
		public const int ProductNotInPriceLevel = 11;
		public const int MissingPriceLevelAmount = 12;
		public const int MissingPriceLevelPercentage = 13;
		public const int MissingPrice = 14;
		public const int MissingCurrentCost = 15;
		public const int MissingStandardCost = 16;
		public const int InvalidPriceLevelAmount = 17;
		public const int InvalidPriceLevelPercentage = 18;
		public const int InvalidPrice = 19;
		public const int InvalidCurrentCost = 20;
		public const int InvalidStandardCost = 21;
		public const int InvalidRoundingPolicy = 22;
		public const int InvalidRoundingOption = 23;
		public const int InvalidRoundingAmount = 24;
		public const int PriceCalculationError = 25;
		public const int InvalidDiscountType = 26;
		public const int DiscountTypeInvalidState = 27;
		public const int InvalidDiscount = 28;
		public const int InvalidQuantity = 29;
		public const int InvalidPricingPrecision = 30;
		public const int MissingProductDefaultUnitOfMeasure = 31;
		public const int MissingProductUnitOfMeasureSchedule = 32;
		public const int InactiveDiscountType = 33;
		public const int InvalidPriceLevelCurrency = 34;
		public const int PriceAttributeOutOfRange = 35;
		public const int BaseCurrencyAttributeOverflow = 36;
		public const int BaseCurrencyAttributeUnderflow = 37;
	}

	/// <summary>
	/// Priority codes.
	/// </summary>
	public static class PriorityCode
	{
		public const int Low = 0;
		public const int Medium = 1;
		public const int High = 2;
	}

	/// <summary>
	/// Quantity selling codes.
	/// </summary>
	public static class QuantitySellingCode
	{
		public const int NoControl = 1;
		public const int Whole = 2;
		public const int WholeAndFraction = 3;
	}

	/// <summary>
	/// Queue type codes.
	/// </summary>
	public static class QueueTypeCode
	{
		public const int Public = 1;
		public const int Private = 2;
		public const int WorkInProgress = 3;
	}

	/// <summary>
	/// Report type codes.
	/// </summary>
	public static class ReportTypeCode
	{
		public const int ReportingServices = 1;
		public const int File = 2;
		public const int Link = 3;
	}

	/// <summary>
	/// Report visibility codes.
	/// </summary>
	public static class ReportVisibilityCode
	{
		public const int ReportsGrid = 1;
		public const int Form = 2;
		public const int Grid = 3;
	}

	/// <summary>
	/// Report link type codes.
	/// </summary>
	public static class ReportLinkTypeCode
	{
		public const int DrillThrough = 1;
		public const int SubReport = 2;
		public const int Both = 3;
	}

	/// <summary>
	/// Number rounding options.
	/// </summary>
	public static class RoundingOption
	{
		public const int EndsIn = 1;
		public const int MultipleOf = 2;
	}

	/// <summary>
	/// Number rounding policy.
	/// </summary>
	public static class RoundingPolicy
	{
		public const int None = 1;
		public const int Up = 2;
		public const int Down = 3;
		public const int Nearest = 4;
	}

	/// <summary>
	/// Duplicate Rule Operator Types
	/// Any changes to this enum must also be reflected in the declaration of the ruleOperatorArray in
	/// src\Application\web\Components\web\Tools\DuplicateDetection\DuplicateDetectionRules\
	/// DuplicateRuleCondition.aspx.cs
	/// </summary>
	public enum DuplicateRuleOperator
	{
		Equals = 0,
		FirstN = 1,
		LastN = 2,
		EqualsDateOnly = 3,
		EqualsDateAndTime = 4,
	}

	/// <summary>
	/// The statuses of DuplicateRule
	/// </summary>
	public enum DuplicateRuleStatus
	{
		Unpublished = 0,
		Publishing = 1,
		Published = 2
	}

	/// <summary>
	/// Saved query types.
	/// </summary>
	public static class SavedQueryType
	{
		public const int MainApplicationView = 0;
		public const int AdvancedSearch = 1;
		public const int SubGrid = 2;
		public const int QuickFindSearch = 4;
		public const int Reporting = 8;
		public const int OfflineFilters = 16;
		public const int MASearch = 32;
		public const int LookupView = 64;
		public const int SMAppointmentBookView = 128;
		public const int OutlookFilters = 256;
		public const int AddressBookFilters = 512;
		public const int MainApplicationViewWithoutSubject = 1024;
		public const int SavedQueryTypeOther = 2048;
	}

	/// <summary>
	/// Call Priority status.
	/// </summary>
	public static class CallPriorityStatus
	{
		public const int Zero = 0;
		public const int Low = 25;
		public const int Normal = 100;
	}

	/// <summary>
	/// Email statuses.
	/// </summary>
	public static class EmailStatus
	{
		public const int Draft = 1;
		public const int Completed = 2;
		public const int Sent = 3;
		public const int Received = 4;
		public const int Canceled = 5;
		public const int PendingSend = 6;
		public const int Sending = 7;
		public const int Failed = 8;
	}

	/// <summary>
	/// Time zone codes.
	/// </summary>
	public static class TimeZoneCode
	{
		public const int None = -1;
		public const int DatelineStandardTime = 0;
		public const int SamoaStandardTime = 1;
		public const int HawaiianStandardTime = 2;
		public const int AlaskanStandardTime = 3;
		public const int PacificStandardTime = 4;
		public const int MountainStandardTime = 10;
		public const int MexicoStandardTime2 = 13;
		public const int USMountainStandardTime = 15;
		public const int CentralStandardTime = 20;
		public const int CanadaCentralStandardTime = 25;
		public const int MexicoStandardTime = 30;
		public const int CentralAmericaStandardTime = 33;
		public const int EasternStandardTime = 35;
		public const int USEasternStandardTime = 40;
		public const int SAPacificStandardTime = 45;
		public const int AtlanticStandardTime = 50;
		public const int SAWesternStandardTime = 55;
		public const int PacificSAStandardTime = 56;
		public const int NewfoundlandStandardTime = 60;
		public const int EastSouthAmericaStandardTime = 65;
		public const int SAEasternStandardTime = 70;
		public const int GreenlandStandardTime = 73;
		public const int MidAtlanticStandardTime = 75;
		public const int AzoresStandardTime = 80;
		public const int CapeVerdeStandardTime = 83;
		public const int GmtStandardTime = 85;
		public const int GreenwichStandardTime = 90;
		public const int CentralEuropeStandardTime = 95;
		public const int CentralEuropeanStandardTime = 100;
		public const int RomanceStandardTime = 105;
		public const int WestEuropeStandardTime = 110;
		public const int WestCentralAfricaStandardTime = 113;
		public const int EastEuropeStandardTime = 115;
		public const int EgyptStandardTime = 120;
		public const int FleStandardTime = 125;
		public const int GtbStandardTime = 130;
		public const int IsraelStandardTime = 135;
		public const int SouthAfricaStandardTime = 140;
		public const int RussianStandardTime = 145;
		public const int ArabStandardTime = 150;
		public const int EastAfricaStandardTime = 155;
		public const int ArabicStandardTime = 158;
		public const int IranStandardTime = 160;
		public const int ArabianStandardTime = 165;
		public const int CaucasusStandardTime = 170;
		public const int AfghanistanStandardTime = 175;
		public const int EkaterinburgStandardTime = 180;
		public const int WestAsiaStandardTime = 185;
		public const int IndiaStandardTime = 190;
		public const int NepalStandardTime = 193;
		public const int CentralAsiaStandardTime = 195;
		public const int SriLankaStandardTime = 200;
		public const int NorthCentralAsiaStandardTime = 201;
		public const int MyanmarStandardTime = 203;
		public const int SEAsiaStandardTime = 205;
		public const int NorthAsiaStandardTime = 207;
		public const int ChinaStandardTime = 210;
		public const int SingaporeStandardTime = 215;
		public const int TaipeiStandardTime = 220;
		public const int WestAustraliaStandardTime = 225;
		public const int NorthAsiaEastStandardTime = 227;
		public const int KoreaStandardTime = 230;
		public const int TokyoStandardTime = 235;
		public const int YakutskStandardTime = 240;
		public const int AusCentralStandardTime = 245;
		public const int CentralAustraliaStandardTime = 250;
		public const int AusEasternStandardTime = 255;
		public const int EastAustraliaStandardTime = 260;
		public const int TasmaniaStandardTime = 265;
		public const int VladivostokStandardTime = 270;
		public const int WestPacificStandardTime = 275;
		public const int CentralPacificStandardTime = 280;
		public const int FijiStandardTime = 285;
		public const int NewZealandStandardTime = 290;
		public const int TongaStandardTime = 300;
	}

	/// <summary>
	/// Outlook client subscription types.
	/// </summary>
	public static class SubscriptionType
	{
		public const int Offline = 0;
		public const int Outlook = 1;
		public const int AddressBookProvider = 2;
		public const int DataMigrationWizard = 3;
	}

	/// <summary>
	/// Types for handling subscription requests.
	/// </summary>
	public static class SubscriptionHandlingType
	{
		public const int Default = 0;
		public const int OptimizedStageModifiedOn = 1;
		public static bool IsValid(int handlingType)
		{
			if (handlingType == Default ||
				handlingType == OptimizedStageModifiedOn)
			{
				return true;
			}
			return false;
		}
	}

	public static class ImportProcessCode
	{
		public const int Process = 1;
		public const int Ignore = 2;
		public const int Internal = 3;
		public const int Unmapped = 4;
	}

	public static class ImportMapType
	{
		public const int Standard = 1;
		public const int OutOfBox = 2;
		public const int InProcess = 3;
	}

	public static class ImportDataDelimiter
	{
		public const int DoubleQuote = 1;
		public const int Null = 2;
		public const int SingleQuote = 3;
	}

	public static class ImportFieldDelimiter
	{
		public const int Colon = 1;
		public const int Comma = 2;
		public const int Tab = 3;
		public const int Semicolon = 4;
	}

	public static class ImportLogPhaseCode
	{
		public const int Parse = 0;
		public const int Transform = 1;
		public const int ImportCreate = 2;
		public const int ImportUpdate = 3;
	}

	public static class ImportModeCode
	{
		public const int Create = 0;
		public const int Update = 1;
	}

	public static class ImportStatus
	{
		public const int Submitted = 0;
		public const int Parsing = 1;
		public const int Transforming = 2;
		public const int Importing = 3;
		public const int Completed = 4;
		public const int Failed = 5;
	}

	public static class ImportFileStatusDetail
	{
		public const int None = 0;
		public const int NotStarted = 1;
		public const int Parsing = 2;
		public const int ParsingComplete = 3;
		public const int ComplexTransformation = 4;
		public const int LookupTransformation = 5;
		public const int PicklistTransformation = 6;
		public const int OwnerTransformation = 7;
		public const int TransformationComplete = 8;
		public const int ImportPass1 = 9;
		public const int ImportPass2 = 10;
		public const int ImportComplete = 11;
	}

	public static class TransformationDataTypeCode
	{
		public const int Reference = 0;
		public const int Value = 1;
	}

	public static class TransformationParameterTypeCode
	{
		public const int Input = 0;
		public const int Output = 1;
	}

	public static class TransformationOffsetMode
	{
		public const int Absolute = 0;
		public const int Relative = 1;
	}

	public static class TransformationTypeName
	{
		public const string Concatenate = "Microsoft.Crm.Transformations.Concatenate";
		public const string Split = "Microsoft.Crm.Transformations.Split";
		public const string Replace = "Microsoft.Crm.Transformations.Replace";
		public const string Substring = "Microsoft.Crm.Transformations.Substring";
		public const string AssignValue = "Microsoft.Crm.Transformations.AssignValue";
		public const string AddToDate = "Microsoft.Crm.Transformations.AddToDate";
		public const string AddToCurrentDate = "Microsoft.Crm.Transformations.AddToCurrentDate";
		public const string AdvancedAddToCurrentDate = "Microsoft.Crm.Transformations.AdvancedAddToCurrentDate";
	}

	/// <summary>
	/// Workflow type.
	/// </summary>
	public static class WorkflowType
	{
		public const int Definition = 1;
		public const int Activation = 2;
		public const int Template = 3;
	}

	public static class WorkflowScope
	{
		public const int User = 1;
		public const int BusinessUnit = 2;
		public const int Deep = 3;
		public const int Global = 4;
	}

	/// <summary>
	/// Type of workflow dependency.
	/// </summary>
	public static class WorkflowDependencyType
	{
		public const int SdkAssociation = 1;
		public const int LocalParameter = 2;
		/// <summary>
		/// PrimaryEntityImage depends on the operation that triggered the workflow and can also change over time.
		/// 
		/// For Delete operation, the value is the same as PrimaryEntityPreImage.
		/// For Create/Update operation, the initial value is the same as PrimaryEntityPostImage.  When workflow is
		/// restarted after wait or delay activity, the value is refreshed with the latest state of the primary entity
		/// in the database.
		/// </summary>
		public const int PrimaryEntityImage = 3;
		public const int PrimaryEntityPreImage = 4;
		public const int PrimaryEntityPostImage = 5;
		public const int RelatedEntityImage = 6;
		public const int CustomEntityDefinition = 7;
		public const int AttributeDefinition = 8;
	}

	/// <summary>
	/// Type of authentication supported.
	/// </summary>
	public sealed class AuthenticationType
	{
		public const int AD = 0;
		public const int Passport = 1;
		public const int Spla = 2;
	}

	/// <summary>
	/// Image type requested by plugins.
	/// </summary>
	public static class EntityImageType
	{
		public const int PreImage = 0;
		public const int PostImage = 1;
		public const int Both = 2;
	}

	/// <summary>
	/// Methods for email delivery.
	/// </summary>
	public static class EmailDeliveryMethod
	{
		public const int None = 0;
		public const int OutlookClient = 1;
		public const int EmailRouter = 2;
        public const int ForwardMailbox = 3;
    }

	/// <summary>
	/// Participation types for activity parties.
	/// </summary>
	public static class ParticipationType
	{
		public const int Sender = 1;
		public const int Recipient = 2;
		public const int CCRecipient = 3;
		public const int BccRecipient = 4;
		public const int RequiredAttendee = 5;
		public const int OptionalAttendee = 6;
		public const int Organizer = 7;
		public const int Regarding = 8;
		public const int Owner = 9;
		public const int Resource = 10;
		public const int Customer = 11;
		public const int Partner = 12;
	}

	/// <summary>
	/// Defines values of Status attribute of entity WorkflowLog.
	/// </summary>
	public static class WorkflowStepActivityStatus
	{
		public const int InProgress = 1;
		public const int SuccessfullyCompleted = 2;
		public const int Failed = 3;
	}

	/// <summary>
	/// SystemUser Access mode definitions.
	/// </summary>
	public static class SystemUserAccessMode
	{
		public const int Full = 0;
		public const int SetupUser = 1;
		public const int ReadOnly = 2;
		public const int SupportUser = 3;
	}

	/// <summary>
	/// Async Template GenerationTypeCode definitions.
	/// </summary>
	public static class GenerationTypeCode
	{
		public const int BulkDupDetectCompleted = 1;
		public const int BulkDeleteCompleted = 2;
		public const int BulkDeleteCompletedWithFailures = 3;
		public const int BulkDeleteFailed = 4;
		public const int ImportCompleted = 5;
		public const int ImportFailed = 6;
		public const int MinGenerationTypeCode =1;
		public const int MaxGenerationTypeCode =6; // Need to modify if a new code is added
	}
}
